package org.example;



import org.example.domain.Manufacture;
import org.example.mapper.ManufactureMapper;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@SpringBootApplication
@RestController
@MapperScan("org.example.mapper")
public class Main {
    @Autowired
    private ManufactureMapper manufactureMapper;

    @RequestMapping("/hello")
    public List<Manufacture> hello() {
        List<Manufacture> manufactureList = manufactureMapper.selectList(null);
        return  manufactureList;
    }
    public static void main(String[] args) {
        SpringApplication.run(Main.class, args);

    }

}